<script type="text/javascript">
    $(document).ready(function(){
        $('#notice').fadeOut(5000);
    });
</script>
<div class="webconfigs_title">
    <span class="fonts">&nbsp;分&nbsp;类&nbsp;管&nbsp;理</span>
</div>
<?php include_partial('global/flash') ?>
<div class="webconfigs_contents">
    <div style="float:left;width:95%;height:40px;border:1px #ccc solid;margin:25px;" >
        <?php include_partial('form',array('form'=>$form)) ?>
    </div>
    <div style="float:left;width:95%;height:auto;border:1px #ccc solid;margin:25px;margin-top:10px;">
        <table style="width:99%;border:1px #ccc solid;text-align: center;margin:5px;border-bottom:none;font-size:13px;" cellspacing="0" cellpadding="0" >
            <tr>
                <td class="table_td_border">
                    分类
                </td>
                <td class="table_td_border">
                    上级分类
                </td>
                <td class="table_td_border">
                    排序
                </td>
                <td class="table_td_border_last">
                    Actions
                </td>
            </tr>
            <?php foreach($article_categorys as $article_category): ?>
            <tr>
                <td class="table_td_border"><?php echo $article_category->getName() ?></td>
                <td class="table_td_border"><?php echo $article_category->getParentCategorys() != false ? $article_category->getParentCategorys() : '无' ?> </td>
                <td class="table_td_border"><?php echo $article_category->getSortNum() ?></td>
                <td class="table_td_border_last" ><a href="<?php echo url_for('ArticleCategorys/index?id='.$article_category->getId()) ?>">编辑</a>&nbsp;|&nbsp;<a href="<?php echo url_for('ArticleCategorys/Delete?id='.$article_category->getId()) ?>">删除</a> </td>
            </tr>
                <?php if($article_category->getChildCategorys()): ?>
                    <?php foreach($article_category->getChildCategorys() as $childCategory): ?>
                    <tr>
                         <td class="table_td_border"><?php echo $childCategory->getName() ?></td>
                         <td class="table_td_border"><?php echo $childCategory->getParentCategorys() != false ? $childCategory->getParentCategorys() : '无' ?> </td>
                         <td class="table_td_border"><?php echo $childCategory->getSortNum() ?></td>
                         <td class="table_td_border_last"><a href="<?php echo url_for('ArticleCategorys/index?id='.$childCategory->getId()) ?>">编辑</a>&nbsp;|&nbsp;<a href="<?php echo url_for('ArticleCategorys/Delete?id='.$childCategory->getId()) ?>">删除</a> </td>
                    </tr>
                    <?php endforeach; ?>
                <?php endif ?>
            <?php endforeach; ?>
        </table>
    </div>
</div>